package com.soso.j.spider.cron;

import java.util.Timer;

public class CronExecutor {
	
	private volatile static CronExecutor cronExecutor=null;
	private CronExecutor(){
	}
	public static CronExecutor getInstance(){
		if(cronExecutor==null){
			synchronized (CronExecutor.class) {
				if(cronExecutor==null){
					cronExecutor=new CronExecutor();
				}
			}
		}
		return cronExecutor;
	}
	
	public void execute(){
		Timer timer = new Timer();
		timer.schedule(new CronJob(), 10*1000, 60*1000);
	}

}
